<#assign module="weixin"/>

<@override name="header">
<link rel="stylesheet" href="${ctx}/assets/css/style.css">
<link rel="stylesheet" href="${ctx}/assets/css/form.css">
</@override>
<@override name="body">

<div class="row margin-top">
	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				微信自定义菜单
	    		<button type="button" class="btn button-pill btn-primary button-tiny menu_add"  >新增菜单</button>
			</div>
			<div class="panel-body">
				<div class="row">
					<div class="col-md-12">
						<h4>编辑<small>可创建最多 3 个一级菜单，每个一级菜单下可创建最多 5 个二级菜单。编辑中的菜单不会马上被用户看到，请放心调试。</small></h4>
						<hr/>
					</div>
				</div>
				<div class="row">
					<div class="col-md-4">
						<div class="tree">
							<ul>
								<#if buttons??>
									<#list buttons as parent>
										<li id="${parent.id}" data-type="${parent.type?if_exists}" data-key="${parent.key?if_exists}" data-url="${parent.url?if_exists}">
											<span class="node">${parent.name}</span> 
											<span class="menu_first addmenu"> <a href="#" data-toggle="tooltip" title="添加菜单"><i class="icon-plus"></i></a></span>
											<span class="menu_opt modify"><a href="#" data-toggle="tooltip" title="修改名称"><i class="icon-pencil"></i></a></span>
											<span class="menu_opt remove"><a href="#" data-toggle="tooltip" title="删除菜单"><i class="icon-remove"></i></a> </span>
											<#if parent.sub_button??>
												<ul>
													<#list parent.sub_button as btn>
													<li id="${btn.id}" data-type="${btn.type?if_exists}" data-key="${btn.key?if_exists}" data-url="${btn.url?if_exists}">
														<span class="node">${btn.name}</span>
														 <span class="menu_first modify"><a href="#" data-toggle="tooltip" title="修改名称"><i class="icon-pencil"></i></a></span>
														 <span class="menu_opt remove"><a href="#" data-toggle="tooltip" title="删除菜单"><i class="icon-remove"></i></a> </span>
													</li>
													</#list>
												</ul>
											</#if>
										</li>
									</#list>
								</#if>
							</ul>
						</div><!--tree-->	
					</div>
					<div class="col-md-8">
						<div class="wxcontent">
							<p class="text-left text-muted" style="margin-top:20px;margin-left:20px;">
								你可以先添加一个菜单，然后开始为其设置响应动作
							</p>
							<form role="form">
								<input type="hidden" name="btnId"/>
								<div class="radio" style="margin-top:20px;margin-left:20px;">
								  <label>
								    <input type="radio" name="optionsRadios" value="drivers"> 查找附近服务人员
								  </label>
								</div>
								<div class="radio" style="margin-top:20px;margin-left:20px;">
								  <label>
								    <input type="radio" name="optionsRadios"  value="myaccount"> 查询我的账户
								  </label>
								</div>
								<div class="radio" style="margin-top:20px;margin-left:20px;">
								  <label>
								    <input type="radio" name="optionsRadios"  value="myorder"> 查询我的订单
								  </label>
								</div>
								<div class="radio" style="margin-top:20px;margin-left:20px;">
								  <label>
								    <input type="radio" name="optionsRadios"  value="price"> 代驾价格表
								  </label>
								</div>
								<div class="radio" style="margin-top:20px;margin-left:20px;">
								  <label>
								    <input type="radio" name="optionsRadios"  value="ConsumerManager"> 客户经理
								  </label>
								</div>
								<!--
								<div class="radio" style="margin-top:20px;margin-left:20px;">
								  <label>
								    <input type="radio" name="optionsRadios"  value="text"> 发送消息
								    <textarea class="form-control" rows="5" style="width:500px;"></textarea>
								    <span class="help-block">最多可输入600个字。</span>
								  </label>
								</div>
								-->
								<div class="radio" style="margin-top:20px;margin-left:20px;">
								  <label>
								    <input type="radio" name="optionsRadios"  value="link"> 链接
								    <input class="form-control" type="text" placeholder="最长为225个字符" style="width:500px;">
								    <span class="help-block">必须以“http://”开头。</span>
								  </label>
								</div>
							</form>	
						</div>
					</div>
				</div><!--col-->
			</div><!--row-->
			<div class="row">
				<div class="col-md-12">
					<h4>发布<small>编辑中的菜单不能直接在用户手机上生效，你需要进行发布，发布后24小时内所有的用户都将更新到新的菜单。</small></h4>
					<hr/>
				</div>
			</div>
			<div class="row">
				<div class="col-md-12">
					<div style="display: table;width: auto;margin-left: auto;margin-right: auto;">
						<button class="btn btn-primary btn-lg publish" style="width:200px;" >发布</button>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</@override>
<@override name="footer">
<script type="text/javascript" src="${ctx}/assets/js/weixin.js"></script>
</@override>
<@extends name="../layout.ftl"/>